/*--------------------------------------------------*/
// Preloader - 预加载
/*--------------------------------------------------*/ 

.html-loading {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

#preloader {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	height: 100%;
	width: 100%;
	background-color: #f5f5f5;
	z-index: $zindex-10;
}

.pre-container {
	position: absolute;
	left: 50%;
	top: 50%;
	bottom: auto;
	right: auto;
	-webkit-transform: translateX(-50%) translateY(-50%);
	transform: translateX(-50%) translateY(-50%);
	text-align: center;
}

.spinner {
	width: 40px;
	height: 40px;
	position: relative;
	margin: 100px auto;
	.double-bounce1, .double-bounce2 {
		width: 100%;
		height: 100%;
		border-radius: 50%;
		background-color: #222;
		opacity: 0.6;
		position: absolute;
		top: 0;
		left: 0;
		-webkit-animation: bounce 2.0s infinite ease-in-out;
		animation: bounce 2.0s infinite ease-in-out;
	}
	.double-bounce2 {
		-webkit-animation-delay: -1.0s;
		animation-delay: -1.0s;
	}
}

@-webkit-keyframes bounce {
	0%,
	100% {
		-webkit-transform: scale(0.0)
	}
	50% {
		-webkit-transform: scale(1.0)
	}
}

@keyframes bounce {
	0%,
	100% {
		transform: scale(0.0);
		-webkit-transform: scale(0.0);
	}
	50% {
		transform: scale(1.0);
		-webkit-transform: scale(1.0);
	}
}

.transition {
	margin: auto;
	width: 100px;
	text-align: center;
	&>div {
		width: 20px;
		height: 20px;
		background-color: #222;
		border-radius: 100%;
		display: inline-block;
		-webkit-animation: bouncedelay 2s infinite ease-in-out;
		animation: bouncedelay 2s infinite ease-in-out;
		-webkit-animation-fill-mode: both;
		animation-fill-mode: both;
	}
	.three-bounce1 {
		-webkit-animation-delay: -0.32s;
		animation-delay: -0.32s;
	}
	.three-bounce2 {
		-webkit-animation-delay: -0.16s;
		animation-delay: -0.16s;
	}
}

@-webkit-keyframes bouncedelay {
	0%,
	80%,
	100% {
		-webkit-transform: scale(0.0)
	}
	40% {
		-webkit-transform: scale(1.0)
	}
}

@keyframes bouncedelay {
	0%,
	80%,
	100% {
		transform: scale(0.0);
		-webkit-transform: scale(0.0);
	}
	40% {
		transform: scale(1.0);
		-webkit-transform: scale(1.0);
	}
}

.cyclic {
	width: 60px;
	height: 60px;
	margin: 0 auto;
	position: relative;
	div {
		width: 100%;
		height: 100%;
		position: absolute;
		-webkit-animation: load 2s linear infinite;
		animation: load 2s linear infinite;
	}
	span {
		display: inline-block;
		width: 10px;
		height: 10px;
		border-radius: 50%;
		background-color: #222;
		position: absolute;
		left: 50%;
		margin-top: -10px;
		margin-left: -10px;
	}
}

@-webkit-keyframes load {
	0% {
		-webkit-transform: rotate(0deg);
	}
	10% {
		-webkit-transform: rotate(45deg);
	}
	50% {
		opacity: 1;
		-webkit-transform: rotate(160deg);
	}
	62% {
		opacity: 0;
	}
	65% {
		opacity: 0;
		-webkit-transform: rotate(200deg);
	}
	90% {
		-webkit-transform: rotate(340deg);
	}
	100% {
		-webkit-transform: rotate(360deg);
	}
}

.cyclic {
	div {
		&:nth-child(1) {
			-webkit-animation-delay: 0.2s;
		}
		&:nth-child(2) {
			-webkit-animation-delay: 0.4s;
		}
		&:nth-child(3) {
			-webkit-animation-delay: 0.6s;
		}
		
		&:nth-child(4) {
			-webkit-animation-delay: 0.8s;
		}
	}
} 